// Public API of the protobuf-ts runtime.
// Note: we do not use `export * from ...` to help tree shakers,
// webpack verbose output hints that this should be useful

// Convenience JSON typings and corresponding type guards
export {JsonValue, JsonObject, typeofJsonValue, isJsonObject} from './json-typings';

// Base 64 encoding
export {base64decode, base64encode} from './base64';

// UTF8 encoding
export {utf8read} from './protobufjs-utf8';

// Binary format contracts, options for reading and writing, for example
export {
    WireType,
    BinaryReadOptions,
    BinaryWriteOptions,
    mergeBinaryOptions,
    IBinaryWriter,
    IBinaryReader,
    UnknownFieldHandler,
} from './binary-format-contract';

// Standard IBinaryReader implementation
export {BinaryReader, binaryReadOptions} from './binary-reader';

// Standard IBinaryWriter implementation
export {BinaryWriter, binaryWriteOptions} from './binary-writer';

// Int64 and UInt64 implementations required for the binary format
export {PbLong, PbULong} from './pb-long';

// JSON format contracts, options for reading and writing, for example
export {
    JsonReadOptions, JsonWriteOptions, JsonWriteStringOptions, jsonReadOptions, jsonWriteOptions, mergeJsonOptions
} from './json-format-contract';

// Message type contract
export {IMessageType, PartialMessage, MESSAGE_TYPE} from './message-type-contract';

// Message type implementation via reflection
export {MessageType} from './message-type';

// Reflection info, generated by the plugin, exposed to the user, used by reflection ops
export {
    ScalarType,
    LongType,
    RepeatType,
    MessageInfo,
    EnumInfo,
    FieldInfo,
    PartialFieldInfo,
    normalizeFieldInfo,
    readFieldOptions,
    readFieldOption,
    readMessageOption
} from './reflection-info';

// Types for messsage objects type at runtime, when concrete type is unknown.
export {
    UnknownEnum,
    UnknownMap,
    UnknownMessage,
    UnknownOneofGroup,
    UnknownScalar
} from './unknown-types';

// Message operations via reflection
export {ReflectionTypeCheck} from './reflection-type-check';
export {reflectionCreate} from './reflection-create';
export {reflectionScalarDefault} from './reflection-scalar-default';
export {reflectionMergePartial} from './reflection-merge-partial';
export {reflectionEquals} from './reflection-equals';
export {ReflectionBinaryReader} from './reflection-binary-reader';
export {ReflectionBinaryWriter} from './reflection-binary-writer';
export {ReflectionJsonReader} from './reflection-json-reader';
export {ReflectionJsonWriter} from './reflection-json-writer';
export {containsMessageType, MessageTypeContainer} from './reflection-contains-message-type';

// Oneof helpers
export {isOneofGroup, setOneofValue, getOneofValue, clearOneofValue, getSelectedOneofValue} from './oneof';

// Enum object type guard and reflection util, may be interesting to the user.
export {EnumObjectValue, listEnumValues, listEnumNames, listEnumNumbers, isEnumObject} from './enum-object';

// lowerCamelCase() is exported for plugin, rpc-runtime and other rpc packages
export {lowerCamelCase} from './lower-camel-case';

// assertion functions are exported for plugin, may also be useful to user
export {assert, assertNever, assertInt32, assertUInt32, assertFloat32} from './assert';
